﻿<ribbon:RibbonWindow x:Class="eStock.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:ribbon="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"
        xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" xmlns:common="clr-namespace:eStock.Common" Title="eStock" Height="800" Width="1000" Icon="/eStock;component/main_icon.ico">
    
    <xctk:BusyIndicator BusyContent="Wird geladen. Bitte warten..." Name="BusyIndi">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <ribbon:Ribbon x:Name="Ribbon" IsEnabled="True" SelectionChanged="RibbonTabChanged">
            <ribbon:Ribbon.ContextMenu>
                <ContextMenu HasDropShadow="True" IsEnabled="True" />
            </ribbon:Ribbon.ContextMenu>
            <ribbon:Ribbon.ApplicationMenu>
                <ribbon:RibbonApplicationMenu Label="Datei" Width="57" ForceCursor="False" IsMainMenu="False" LargeImageSource="/eStock;component/Images/main_icon.png" SmallImageSource="/eStock;component/Images/main_icon.png">
                    <ribbon:RibbonApplicationMenuItem Header="Einstellungen"
                                                      x:Name="Settings"
                                                      ImageSource="Images\setting_tools.png" Click="SettingsClick" />
                    <ribbon:RibbonApplicationMenuItem Header="Info"
                                                      x:Name="info"
                                                      ImageSource="Images\information.png"/>
                    <ribbon:RibbonSeparator/>
                    <ribbon:RibbonApplicationMenuItem Header="Beenden"
                                                      x:Name="exit"
                                                      ImageSource="Images\exit.png"
                                                      Click="ExitClick"/>
                </ribbon:RibbonApplicationMenu>
            </ribbon:Ribbon.ApplicationMenu>
            <ribbon:RibbonTab x:Name="HomeTab" 
                              Header="Bauteile" Tag="0">
                        <ribbon:RibbonGroup x:Name="Group1" 
                                    Header="Verwalten">
                        <ribbon:RibbonButton x:Name="rbAddComponent"
                                         LargeImageSource="Images\add.png"
                                         Label="Hinzufügen"
                                         IsDefault="False" IsCancel="False" Click="RbAddComponentClick" IsEnabled="{Binding DBLoaded,Source={x:Static common:Globals.Instance}, Mode=TwoWay}" />

                        <ribbon:RibbonButton x:Name="rbEdit"
                                         LargeImageSource="Images\edit.png"
                                         Label="Bearbeiten" Click="RbEditClick" IsEnabled="{Binding DBLoaded,Source={x:Static common:Globals.Instance}, Mode=TwoWay}"/>
                    <ribbon:RibbonButton x:Name="rbDelete"
                                         LargeImageSource="Images\delete.png"
                                         Label="Löschen" Click="RbDeleteClick" IsEnabled="{Binding DBLoaded,Source={x:Static common:Globals.Instance}, Mode=TwoWay}"/>
                </ribbon:RibbonGroup>
                <ribbon:RibbonGroup Header="Datenbank">
                        <ribbon:RibbonButton x:Name="rbUpdateDb"
                                         LargeImageSource="Images\updateDB.png" Label="Aktualisieren" Click="RbUpdateDbClick"  />
                </ribbon:RibbonGroup>
                    <ribbon:RibbonGroup Header="Funktionen">
                        <ribbon:RibbonButton x:Name="rbPrint"
                                         LargeImageSource="Images\print.png" Label="Drucken" Click="RbPrintClick"  />
                    </ribbon:RibbonGroup>
                </ribbon:RibbonTab>
             
            <ribbon:RibbonTab x:Name="TabBoxes" Header="Lager" Tag="1">
                    <ribbon:RibbonGroup Header="Verwalten">
                        <ribbon:RibbonButton x:Name="rbAddTray"
                                         LargeImageSource="Images\add.png"
                                         Label="Hinzufügen"
                                         IsDefault="False" IsCancel="False" IsEnabled="{Binding DBLoaded,Source={x:Static common:Globals.Instance}, Mode=TwoWay}" />
                        <ribbon:RibbonButton x:Name="rbEditTray"
                                         LargeImageSource="Images\edit.png"
                                         Label="Bearbeiten"  IsEnabled="{Binding DBLoaded,Source={x:Static common:Globals.Instance}, Mode=TwoWay}"/>
                        <ribbon:RibbonButton x:Name="rbDeleteTray"
                                         LargeImageSource="Images\delete.png"
                                         Label="Löschen"  IsEnabled="{Binding DBLoaded,Source={x:Static common:Globals.Instance}, Mode=TwoWay}"/>
                    </ribbon:RibbonGroup>
                    <ribbon:RibbonGroup Header="Laberbestand">
                        <ribbon:RibbonButton x:Name="rbAddComponentToTray"
                                         LargeImageSource="Images\add.png"
                                         Label="Bauteil hinzufügen"
                                         IsDefault="False" IsCancel="False"  />

                        <ribbon:RibbonButton x:Name="rbRemoveComponentTray"
                                         LargeImageSource="Images\delete.png"
                                         Label="Löschen"  />
                    </ribbon:RibbonGroup>
                </ribbon:RibbonTab>
            
                <ribbon:RibbonTab x:Name="TabTypes" Header="Bauteiltypen" Tag="2">
                    
                </ribbon:RibbonTab>
            
            <ribbon:RibbonTab x:Name="TabCategories" Header="Kategorien" Tag="3">
            </ribbon:RibbonTab>
            <ribbon:RibbonTab x:Name="TabShops" Header="Lieferanten" Tag="4">
            </ribbon:RibbonTab>
            <ribbon:RibbonTab x:Name="TabProjects" Header="Projekte"  Tag="5">        
            </ribbon:RibbonTab>
        </ribbon:Ribbon>
        <ContentPresenter Name="ContentPanel" Grid.Row="1"/>
    </Grid>
    </xctk:BusyIndicator>
</ribbon:RibbonWindow>
